﻿$(function () {
    $(loginForm).submit(function (e) {
        e.preventDefault();
        login();
    });
    function login() {
        $.showPreloader('登录中');
  
        utils.$postJson({ userName: $("#userName").val(), userPassword: $("#userPwd").val() }, "/account/UserLogin", function (response) {
            $.hidePreloader();
            if (response.indexOf("err:") > -1) {
                $.toast(response.substr(4));
                return false;
            }
            location = "/home/index";
        });
    }
});